\(\int \frac {(d+e x^2) (a+b \log (c x^n))}{x^2} \, dx\) [180]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 44 \[ \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {b d n}{x}-b e n x-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}+e x \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-b*d*n/x-b*e*n*x-d*(a+b*ln(c*x^n))/x+e*x*(a+b*ln(c*x^n))

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {14, 2372} \[ \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}+e x \left (a+b \log \left (c x^n\right )\right )-\frac {b d n}{x}-b e n x \]

[In]

Int[((d + e*x^2)*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((b*d*n)/x) - b*e*n*x - (d*(a + b*Log[c*x^n]))/x + e*x*(a + b*Log[c*x^n])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = -\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}+e x \left (a+b \log \left (c x^n\right )\right )-(b n) \int \left (e-\frac {d}{x^2}\right ) \, dx \\ & = -\frac {b d n}{x}-b e n x-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}+e x \left (a+b \log \left (c x^n\right )\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.11 \[ \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {a d}{x}-\frac {b d n}{x}+a e x-b e n x-\frac {b d \log \left (c x^n\right )}{x}+b e x \log \left (c x^n\right ) \]

[In]

Integrate[((d + e*x^2)*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((a*d)/x) - (b*d*n)/x + a*e*x - b*e*n*x - (b*d*Log[c*x^n])/x + b*e*x*Log[c*x^n]

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.14

method result size
parallelrisch \(-\frac {-b e \,x^{2} \ln \left (c \,x^{n}\right )+b e n \,x^{2}-a e \,x^{2}+b \ln \left (c \,x^{n}\right ) d +b d n +a d}{x}\) \(50\)
risch \(-\frac {b \left (-e \,x^{2}+d \right ) \ln \left (x^{n}\right )}{x}-\frac {i \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) b e \,x^{2}-i \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} b e \,x^{2}-i \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} b e \,x^{2}+i \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3} b e \,x^{2}-i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b d \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b d \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (c \right ) b e \,x^{2}+2 b e n \,x^{2}-2 a e \,x^{2}+2 d b \ln \left (c \right )+2 b d n +2 a d}{2 x}\) \(249\)

[In]

int((e*x^2+d)*(a+b*ln(c*x^n))/x^2,x,method=_RETURNVERBOSE)

[Out]

-1/x*(-b*e*x^2*ln(c*x^n)+b*e*n*x^2-a*e*x^2+b*ln(c*x^n)*d+b*d*n+a*d)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.32 \[ \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {b d n + {\left (b e n - a e\right )} x^{2} + a d - {\left (b e x^{2} - b d\right )} \log \left (c\right ) - {\left (b e n x^{2} - b d n\right )} \log \left (x\right )}{x} \]

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="fricas")

[Out]

-(b*d*n + (b*e*n - a*e)*x^2 + a*d - (b*e*x^2 - b*d)*log(c) - (b*e*n*x^2 - b*d*n)*log(x))/x

Sympy [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.05 \[ \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=- \frac {a d}{x} + a e x - \frac {b d n}{x} - \frac {b d \log {\left (c x^{n} \right )}}{x} - b e n x + b e x \log {\left (c x^{n} \right )} \]

[In]

integrate((e*x**2+d)*(a+b*ln(c*x**n))/x**2,x)

[Out]

-a*d/x + a*e*x - b*d*n/x - b*d*log(c*x**n)/x - b*e*n*x + b*e*x*log(c*x**n)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.11 \[ \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-b e n x + b e x \log \left (c x^{n}\right ) + a e x - \frac {b d n}{x} - \frac {b d \log \left (c x^{n}\right )}{x} - \frac {a d}{x} \]

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="maxima")

[Out]

-b*e*n*x + b*e*x*log(c*x^n) + a*e*x - b*d*n/x - b*d*log(c*x^n)/x - a*d/x

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.23 \[ \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-{\left (b e n - b e \log \left (c\right ) - a e\right )} x + {\left (b e n x - \frac {b d n}{x}\right )} \log \left (x\right ) - \frac {b d n + b d \log \left (c\right ) + a d}{x} \]

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="giac")

[Out]

-(b*e*n - b*e*log(c) - a*e)*x + (b*e*n*x - b*d*n/x)*log(x) - (b*d*n + b*d*log(c) + a*d)/x

Mupad [B] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.16 \[ \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=e\,x\,\left (a-b\,n\right )-\ln \left (c\,x^n\right )\,\left (\frac {b\,e\,x^2+b\,d}{x}-2\,b\,e\,x\right )-\frac {a\,d+b\,d\,n}{x} \]

[In]

int(((d + e*x^2)*(a + b*log(c*x^n)))/x^2,x)

[Out]

e*x*(a - b*n) - log(c*x^n)*((b*d + b*e*x^2)/x - 2*b*e*x) - (a*d + b*d*n)/x